const express = require('express')
const router = express.Router()
const userHandler = require('../router_handler/user')

// 自动验证表单数据的中间件
const expressJoi = require('@escook/express-joi')
// 需要的验证规则
const {reg_login_schema} = require("../schema/user")

router.post('/reguser', expressJoi(reg_login_schema), userHandler.regUser)
// 登录
router.post('/login', userHandler.login)

module.exports = router